let loaded = false;
export const loadIconfont = () => {
  return new Promise((resolve, reject) => {
    if (loaded) return resolve();

    const script = document.createElement('script');
    script.src = process.env.VUE_APP_ICONFONT_URL;
    script.onload = () => {
      loaded = true;
      resolve();
    };
    script.onerror = reject;
    document.head.appendChild(script);
  });
};